package com.geek.entity;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * po类 实体类  User.java
 * @author
 */
public class User {
	//属性名称和数据库表的字段对应
	private int id;
	private String name;// 用户姓名
	private int age;    // 用户年龄
	private String gender; // 性别
	private LocalDate birthday;// 生日
	private String pic;    // 头像
	private String pwd;    // 密码
	private String state;      // 状态

	//一对多 关联订单
	private List<Orders> ordersList;


	public User() {
	}

	//用于测试的部分构造函数
	public User(String name, int age, String gender, LocalDate birthday, String pwd) {
		this.name = name;
		this.age = age;
		this.gender = gender;
		this.birthday = birthday;
		this.pwd = pwd;
	}
	public User(int id, String name, int age, String gender, LocalDate birthday, String pic, String pwd, String state) {
		this.id = id;
		this.name = name;
		this.age = age;
		this.gender = gender;
		this.birthday = birthday;
		this.pic = pic;
		this.pwd = pwd;
		this.state = state;
	}

	public User(int id, String name, int age, String gender, LocalDate birthday, String pic, String pwd, String state, List<Orders> ordersList) {
		this.id = id;
		this.name = name;
		this.age = age;
		this.gender = gender;
		this.birthday = birthday;
		this.pic = pic;
		this.pwd = pwd;
		this.state = state;
		this.ordersList = ordersList;
	}

	/**
	 * 获取
	 * @return id
	 */
	public int getId() {
		return id;
	}

	/**
	 * 设置
	 * @param id
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * 获取
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * 设置
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取
	 * @return age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * 设置
	 * @param age
	 */
	public void setAge(int age) {
		this.age = age;
	}

	/**
	 * 获取
	 * @return gender
	 */
	public String getGender() {
		return gender;
	}

	/**
	 * 设置
	 * @param gender
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}

	/**
	 * 获取
	 * @return birthday
	 */
	public LocalDate getBirthday() {
		return birthday;
	}

	/**
	 * 设置
	 * @param birthday
	 */
	public void setBirthday(LocalDate birthday) {
		this.birthday = birthday;
	}

	/**
	 * 获取
	 * @return pic
	 */
	public String getPic() {
		return pic;
	}

	/**
	 * 设置
	 * @param pic
	 */
	public void setPic(String pic) {
		this.pic = pic;
	}

	/**
	 * 获取
	 * @return pwd
	 */
	public String getPwd() {
		return pwd;
	}

	/**
	 * 设置
	 * @param pwd
	 */
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	/**
	 * 获取
	 * @return state
	 */
	public String getState() {
		return state;
	}

	/**
	 * 设置
	 * @param state
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * 获取
	 * @return ordersList
	 */
	public List<Orders> getOrdersList() {
		return ordersList;
	}

	/**
	 * 设置
	 * @param ordersList
	 */
	public void setOrdersList(List<Orders> ordersList) {
		this.ordersList = ordersList;
	}

	public String toString() {
		return "User{id = " + id + ", name = " + name + ", age = " + age + ", gender = " + gender + ", birthday = " + birthday + ", pic = " + pic + ", pwd = " + pwd + ", state = " + state + ", ordersList = " + ordersList + "}";
	}
}
